package com.wushijia.highconcurrency;

/**
 * description:
 *
 * @author yang
 * @date 2018/5/10 20:28
 */
public class JoinTest {

  public volatile static int i = 0;

  public static void main(String[] args) throws InterruptedException {
    Thread thread = new Thread() {
      @Override
      public void run() {
        for (i = 0; i < 10000; i++) {
          ;
        }
      }
    };

    thread.start();
    thread.join();
    System.out.println(i);
  }
}
